package cn.qlin.mvc.orm.db;

/**
 * @author 吴延麟
 * 描述：主键策略
 * */
public class KeyTactics {
	public static String dbname = "mysql";
	/**
	 * @author 吴延麟
	 * 描述：自增长
	 * */
	public static String getInsert(String type) {
		System.out.println(type);
		if("auto".equals(type)){
			return KeyTactics.getInsertauto();
		}
		if("uuid".equals(type)){
			return KeyTactics.getInsertuuid();
		}
		return null;

	}
	private static String getInsertauto(){
		String str = "";
		if("mysql".equals(dbname)){
			str = "null"; 
		}
		return str;
	}
	private static String getInsertuuid(){
		String str = "";
		if("mysql".equals(dbname)){
			str = "uuid()"; 
		}
		return str;
	}
}